package com.md03.service;

import com.md03.dao.TeacherDao;
import com.md03.entity.Teacher;
import lombok.Data;

@Data
public class TeacherServiceImpl implements TeacherService {
    //厨师要加工食材，首先得有食材，由采购员提供，就要以来采购员
    private TeacherDao teacherDao;//接口

    @Override
    public Teacher getOneTeacherById(int id) {
        Teacher teacher = teacherDao.selectOneById(id);
        return teacher;
    }

    @Override
    public boolean deleteOneTeacherById(int id) {
        int i = teacherDao.deleteTeacherById(id);
        return i > 0;
    }
}
